package com.songlanyun.common.utils;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RsUtils {
    @Autowired
    private RedisUtils redisUtils;

    public Boolean getToken(String token,String userId){

        String result = redisUtils.getCacheObject("LoginInterceptor:" + userId);
        if (StringUtils.isNotBlank(result) && result.equals(token)){
            return true;
        } else {
            return false;
        }
    }
}
